<!DOCTYPE HTML>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title>搜素列表</title>
		<link rel="stylesheet" type="text/css" th:href="@{/css/aui.2.0.css}" />
		<link rel="stylesheet" type="text/css" th:href="@{/css/style.css}" />
		<link rel="stylesheet" th:href="@{/css/mui.min.css}" />
		<link rel="stylesheet" th:href="@{/css/common.css}" />
		<link rel="stylesheet" th:href="@{/css/icons-extra.css}" />
		<link rel="stylesheet" th:href="@{/css/search/menudown.css}" />

		<body>
			<dl class="topmenu">
				<dt>
				<div class="selectlist">
					<div class="select_textdiv">
						<input type="hidden" value=""/>
						<p class="s_text">地区&nbsp;▼</p>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li>
								<p>全部</p>
							</li>
							<li>
								<p>西乡塘</p>
							</li>
							<li>
								<p>青秀区</p>
							</li>
						</ul>
					</div>
				</div>	
			</dt>
				<dt>
				<div class="selectlist">
					<div class="select_textdiv">
						<input type="hidden" value=""/>
						<p class="s_text">类型&nbsp;▼</p>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li>
								<p>全部</p>
							</li>
							<li>
								<p>10人以下</p>
							</li>
							<li>
								<p>10-20人</p>
							</li>
							<li>
								<p>20-30人</p>
							</li>
							<li>
								<p>30-50人</p>
							</li>
							<li>
								<p>50人以上</p>
							</li>
						</ul>
					</div>
				</div>	
			</dt>
				<dt>
				<div class="selectlist">
					<div class="select_textdiv">
						<input type="hidden" value=""/>
						<p class="s_text">价格&nbsp;▼</p>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li>
								<p>500以下</p>
							</li>
							<li>
								<p>500-1000</p>
							</li>
							<li>
								<p>1000-3000</p>
							</li>
							<li>
								<p>3000以上</p>
							</li>
						</ul>
					</div>
				</div>	
			</dt>
				<dt>
				<div class="selectlist">
					<div class="select_textdiv">
						<input type="hidden" value=""/>
						<p class="s_text">更多&nbsp;▼</p>
					</div>
					<div class="select_textul">
						<ul class="select_first_ul">
							<li>
								<p>按销量排行</p>
							</li>
							<li>
								<p>按评价排行</p>
							</li>
						</ul>
					</div>
				</div>	
			</dt>
			</dl>
			<div class="line-margin-40"></div>
			<div class="search-list  aui-content-padded">

			</div>
			<p class="mui-text-center" style="display: none;" id="ts">正在加载...</p>
			<div class="line-margin-40"></div>
			<div class="line-margin-40"></div>
			<div th:include="common/footer :: nav"></div>
			<script type="text/javascript" language="javascript" src="/js/jquery.min.js"></script>
			<script type="text/javascript" src="/js/api.js"></script>
			<script type="text/javascript" src="/js/search/menudown.js"></script>
			<script>
				var list = $(".search-list");
				var ts = $("#ts");
				var page = 1;
				getList(page);
				$(window).scroll(function(event) {
					if((50 + $(window).scrollTop()) >= ($(document).height() - $(window).height())) {
						getList(page);
						page++;
					}
				});

				function getList(page) {
					$.ajax({
						url: '/product/findtype',
						data: {
							type: '场地',
							page: page,
							size: 3,
						},
						type: 'get',
						dataType: 'json',
						beforesend:function(){
							ts.html("正在加载...");
							ts.show();
						},
						success: function(response) {

							if(response.code == 200) {
								if(response.result.length<3){
									ts.html("没有更多数据了...");
									ts.show();
								}else{
									ts.hide();
								}
								for(var i = 0; i < response.result.length; i++) {
									var html = '<div class="aui-card-list aui-margin-t-10">' +
										'<div class="aui-card-list-content">' +
										'<div class="aui-card-list-content">' +
										'<div class="images-wrapper">' +
										'<img src="/img/card-1.jpg">' +
										'<div class="images-content images-left">' +
										'&nbsp;￥' + response.result[i].value + '&nbsp;&nbsp;' +
										'</div>' +
										'<div class="images-content images-right add-plan">' +
										'&nbsp;&nbsp;加入计划&nbsp;&nbsp;' +
										'</div>' +
										'</div>' +
										'</div>' +
										'</div>' +
										'<div class="aui-card-list-footer " onclick="location.href=\'/site/detail\'">' +
										response.result[i].title +
										'</div>' +
										'</div>';

									list.append(html);
								}
							}

						}

					});

				}
			</script>
		</body>

</html>